# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         test04
# Description:
# Author:       98745
# Date:         2019/5/25
#-------------------------------------------------------------------------------

import threading
from time import sleep,ctime

def fun(index,sec):
    print('开始执行:',index,'时间：',ctime())
    sleep(sec)
    print('结束执行:',index,'时间：',ctime())

def main():
    thread1=threading.Thread(target=fun,args=(10,4))
    thread1.start()
    thread2=threading.Thread(target=fun,args=(20,2))
    thread2.start()
    thread1.join()
    thread2.join()
    print('main is over')


if __name__ == '__main__':
    main()